package dhy.lyb.change.service;

import dhy.lyb.change.model.User;
import dhy.lyb.change.model.UserActivity;
import dhy.lyb.change.model.UserActivityCustom;

import java.util.List;

/**
 * Created by Administrator on 2016/11/18.
 */
public interface UserService extends BaseService<User> {

    /**
     * 用户登录检测
     *
     * @param user
     * @return
     */
    public int checkLogin(User user);

    /**
     * jj
     * @param user
     * @return
     */
    public int checkMobile(User user);

    /**
     * 修改密码
     *
     * @param user
     * @return
     */
    public int updatePasswordByMobile(User user);


    /**
     * ..
     *
     * @return
     */
    public List<User> getUserActivityList();

    /**
     * ....
     *
     * @param user
     * @return
     */
    public User getUserActivityById(User user);

    /**
     * 计算总量？
     *
     * @param user
     * @return
     */
    public UserActivityCustom getUserActivityItemById(User user);

    /**
     * 添加用户与训练项目的关联
     *
     * @param user_id
     * @param activity_id
     * @return
     */
    public int insertUserActivity(Integer user_id, Integer activity_id);

    /**
     * 删除用户与训练项目的关联
     *
     * @param user_id
     * @param activity_id
     * @return
     */
    public int deleteUserActivity(Integer user_id, Integer activity_id);


    /**
     * 添加用户与食物的关联
     *
     * @param user_id
     * @param food_id
     * @return
     */
    public int insertUserFood(Integer user_id, Integer food_id);

    /**
     * 删除用户与食物的关联
     *
     * @param user_id
     * @param food_id
     * @return
     */
    public int deleteUserFood(Integer user_id, Integer food_id);

    /**
     * 更新训练项目的信息
     *
     * @param userActivity
     * @return
     */
    public int updateUserActivityUses(UserActivity userActivity);



    /**
     * 检查用户是否有训练的项目
     *
     * @param user_id
     * @return
     */
    public int checkUserActivity(Integer user_id);


}
